dialog: Use default decoration for non-custom headerbars
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 12 May 2019 09:58:22 +0000 (09:58 +0000)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 12 May 2019 20:09:03 +0000 (20:09 +0000)
commit66c8a996f9bbb60e15171650e80e4bb886886490
treeb9a3124d6d703c8bd191b33d829b4f219cb6b3c8
parent1318d3748afba9ef8c476f05cca0516f885faeb7
dialog: Use default decoration for non-custom headerbars

There are two ways GTK can add a headerbar to a dialog:

 - the dialog is constructed with the :use-header-bar property

 - all windows should use client-side decorations

In the first case, the headerbar is added by GtkDialog with no
dedicated style class, and in the latter by GtkWindow with the
"default-decoration" style.

As a result, dialogs with plain titlebars can end up with clearly
distinct and inconsistent styles.

To address this, allow headerbars to track whether they should use
the "default-decoration" style and enable it for dialogs.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/836
gtk/gtkdialog.c
gtk/gtkheaderbar.c
gtk/gtkheaderbarprivate.h
gtk/ui/gtkdialog.ui